var Lottery_Rules = {
		"11x5qsfs": {
			showname: '复式',
			rulecode: '11x5qsfs',
			realname: '[前三星直选_复式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qsfs"><dd><h5>万位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5qsfs_w_01">01</li><li id="11x5qsfs_w_02">02</li><li id="11x5qsfs_w_03">03</li>'
				+'<li id="11x5qsfs_w_04">04</li><li id="11x5qsfs_w_05">05</li><li id="11x5qsfs_w_06">06</li><li id="11x5qsfs_w_07">07</li>'
				+'<li id="11x5qsfs_w_08">08</li><li id="11x5qsfs_w_09">09</li><li id="11x5qsfs_w_10">10</li><li id="11x5qsfs_w_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qsfs_w_ful_1-11">全</li><li datascope="11x5qsfs_w_big_1-11">大</li><li datascope="11x5qsfs_w_sma_1-11">小</li>'
				+'<li datascope="11x5qsfs_w_sin_1-11">单</li><li datascope="11x5qsfs_w_dou_1-11">双</li><li datascope="11x5qsfs_w_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>千位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qsfs_q_01">01</li><li id="11x5qsfs_q_02">02</li><li id="11x5qsfs_q_03">03</li>'
				+'<li id="11x5qsfs_q_04">04</li><li id="11x5qsfs_q_05">05</li><li id="11x5qsfs_q_06">06</li><li id="11x5qsfs_q_07">07</li>'
				+'<li id="11x5qsfs_q_08">08</li><li id="11x5qsfs_q_09">09</li><li id="11x5qsfs_q_10">10</li><li id="11x5qsfs_q_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qsfs_q_ful_1-11">全</li><li datascope="11x5qsfs_q_big_1-11">大</li><li datascope="11x5qsfs_q_sma_1-11">小</li>'
				+'<li datascope="11x5qsfs_q_sin_1-11">单</li><li datascope="11x5qsfs_q_dou_1-11">双</li><li datascope="11x5qsfs_q_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>百位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qsfs_b_01">01</li><li id="11x5qsfs_b_02">02</li><li id="11x5qsfs_b_03">03</li>'
				+'<li id="11x5qsfs_b_04">04</li><li id="11x5qsfs_b_05">05</li><li id="11x5qsfs_b_06">06</li><li id="11x5qsfs_b_07">07</li>'
				+'<li id="11x5qsfs_b_08">08</li><li id="11x5qsfs_b_09">09</li><li id="11x5qsfs_b_10">10</li><li id="11x5qsfs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qsfs_b_ful_1-11">全</li><li datascope="11x5qsfs_b_big_1-11">大</li><li datascope="11x5qsfs_b_sma_1-11">小</li>'
				+'<li datascope="11x5qsfs_b_sin_1-11">单</li><li datascope="11x5qsfs_b_dou_1-11">双</li><li datascope="11x5qsfs_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从万、千、百位各选一个号码组成一注。',
			betexample: '投注方案：02 03 04 * *；开奖号码：02 03 04 * *',
			bethelp: '从万位、千位、百位中选择一个3位数号码组成一注，所选号码与开奖号码的万位、千位、百位相同，且顺序一致，即为中奖。',
			formatBalls : function(balls) {
				return formatBall(balls['w'])+','+formatBall(balls['q'])+','+formatBall(balls['b']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.w") || !way.get(this.rulecode + ".count.q") || !way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballw = way.get(this.rulecode + ".balls.w");
					var ballq = way.get(this.rulecode + ".balls.q");
					var ballb = way.get(this.rulecode + ".balls.b");
					  var itemcount = 0;
				        for (var i = 0; i < ballw.length; i++) {
				            for (var j = 0; j < ballq.length; j++) {
				                for (var k = 0; k < ballb.length; k++) {
				                	if(ballw[i]!=undefined&&ballq[j]!=undefined&&ballb[k]!=undefined&&ballw[i]!=""&&ballq[j]!=""&&ballb[k]!=""){
					                    if (ballw[i] != ballq[j] && ballw[i] != ballb[k] && ballq[j] != ballb[k]) {
					                    	itemcount++;
					                    }
				                	}
				                }
				            }
				        }
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["w","q","b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5qsds":{
			showname: '单式',
			rulecode: '11x5qsds',
			realname: '[前三星直选_单式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入3个号码组成一注。',
			betexample: '投注方案：020304 * *； 开奖号码：02 03 04 * *，即中前三星直选一等奖',
			bethelp: '手动输入号码，从01-11中任意输入3个号码组成一注，所选号码与开奖号码的万位、千位、百位相同，且顺序一致，即为中奖。',
			textarea: {},
			vali: function() {
				var itemcount=0;

				if (way.get("Lottery.context")) {
					var v=way.get("Lottery.context");
					var reg=/(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz=util_unique(v, reg, 2);
					sszz = sszz.sort();
					if(sszz){
						itemcount=sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else
						way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k=String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' '&&k!=','&&k!=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context","");
			}
		},
		"11x5zsfs": {
			showname: '复式',
			rulecode: '11x5zsfs',
			realname: '[中三星直选_复式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5zsfs">'
				+ '<dd><h5>千位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5zsfs_q_01">01</li><li id="11x5zsfs_q_02">02</li><li id="11x5zsfs_q_03">03</li>'
				+'<li id="11x5zsfs_q_04">04</li><li id="11x5zsfs_q_05">05</li><li id="11x5zsfs_q_06">06</li><li id="11x5zsfs_q_07">07</li>'
				+'<li id="11x5zsfs_q_08">08</li><li id="11x5zsfs_q_09">09</li><li id="11x5zsfs_q_10">10</li><li id="11x5zsfs_q_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zsfs_q_ful_1-11">全</li><li datascope="11x5zsfs_q_big_1-11">大</li><li datascope="11x5zsfs_q_sma_1-11">小</li>'
				+'<li datascope="11x5zsfs_q_sin_1-11">单</li><li datascope="11x5zsfs_q_dou_1-11">双</li><li datascope="11x5zsfs_q_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>百位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5zsfs_b_01">01</li><li id="11x5zsfs_b_02">02</li><li id="11x5zsfs_b_03">03</li>'
				+'<li id="11x5zsfs_b_04">04</li><li id="11x5zsfs_b_05">05</li><li id="11x5zsfs_b_06">06</li><li id="11x5zsfs_b_07">07</li>'
				+'<li id="11x5zsfs_b_08">08</li><li id="11x5zsfs_b_09">09</li><li id="11x5zsfs_b_10">10</li><li id="11x5zsfs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zsfs_b_ful_1-11">全</li><li datascope="11x5zsfs_b_big_1-11">大</li><li datascope="11x5zsfs_b_sma_1-11">小</li>'
				+'<li datascope="11x5zsfs_b_sin_1-11">单</li><li datascope="11x5zsfs_b_dou_1-11">双</li><li datascope="11x5zsfs_b_cle_1-11">清</li></ul></dd>'
				+'<dd><h5>十位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5zsfs_s_01">01</li><li id="11x5zsfs_s_02">02</li><li id="11x5zsfs_s_03">03</li>'
				+'<li id="11x5zsfs_s_04">04</li><li id="11x5zsfs_s_05">05</li><li id="11x5zsfs_s_06">06</li><li id="11x5zsfs_s_07">07</li>'
				+'<li id="11x5zsfs_s_08">08</li><li id="11x5zsfs_s_09">09</li><li id="11x5zsfs_s_10">10</li><li id="11x5zsfs_s_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zsfs_s_ful_1-11">全</li><li datascope="11x5zsfs_s_big_1-11">大</li><li datascope="11x5zsfs_s_sma_1-11">小</li>'
				+'<li datascope="11x5zsfs_s_sin_1-11">单</li><li datascope="11x5zsfs_s_dou_1-11">双</li><li datascope="11x5zsfs_s_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从千、百、十位各选一个号码组成一注。',
			betexample: '投注方案：* 02 03 04 *；开奖号码：* 02 03 04 *',
			bethelp: '从千、百、十位中选择一个3位数号码组成一注，所选号码与开奖号码的千位、百位、十位相同，且顺序一致，即为中奖。',
			formatBalls : function(balls) {
				return formatBall(balls['q'])+','+formatBall(balls['b'])+','+formatBall(balls['s']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.q") || !way.get(this.rulecode + ".count.b") || !way.get(this.rulecode + ".count.s")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballq = way.get(this.rulecode + ".balls.q");
					var ballb = way.get(this.rulecode + ".balls.b");
					var balls = way.get(this.rulecode + ".balls.s");
					  var itemcount = 0;
				        for (var i = 0; i < ballq.length; i++) {
				            for (var j = 0; j < ballb.length; j++) {
				                for (var k = 0; k < balls.length; k++) {
				                	if(ballq[i]!=undefined&&ballb[j]!=undefined&&balls[k]!=undefined&&ballq[i]!=""&&ballb[j]!=""&&balls[k]!=""){
					                    if (ballq[i] != ballb[j] && ballq[i] != balls[k] && ballb[j] != balls[k]) {
					                    	itemcount++;
					                    }
				                	}
				                }
				            }
				        }
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["q","b","s"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5zsds":{
			showname: '单式',
			rulecode: '11x5zsds',
			realname: '[中三星直选_单式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入3个号码组成一注。',
			betexample: '投注方案：* 020304 *； 开奖号码：* 02 03 04 *，即中前三星直选一等奖',
			bethelp: '手动输入一个3位数号码组成一注，所选号码与开奖号码的千位、百位、十位相同，且顺序一致，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v=way.get("Lottery.context");
					var reg=/(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz=util_unique(v, reg, 2);
					sszz = sszz.sort();
					if(sszz){
						itemcount=sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k=String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' '&&k!=','&&k!=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context","");
			}
		},
		"11x5dt2z2":{
			showname: '二中二',
			rulecode: '11x5dt2z2',
			realname: '[胆拖任选_二中二]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=4;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				}else{
					return currentRecodNumber;
				}
			},
			fixed: 0.01,
			minMode:1850,
			startPrice:10.02,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt2z2"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt2z2_d_01">01</li><li id="11x5dt2z2_d_02">02</li><li id="11x5dt2z2_d_03">03</li>'
				+'<li id="11x5dt2z2_d_04">04</li><li id="11x5dt2z2_d_05">05</li><li id="11x5dt2z2_d_06">06</li><li id="11x5dt2z2_d_07">07</li>'
				+'<li id="11x5dt2z2_d_08">08</li><li id="11x5dt2z2_d_09">09</li><li id="11x5dt2z2_d_10">10</li><li id="11x5dt2z2_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt2z2_d_ful_1-11">全</li><li datascope="11x5dt2z2_d_big_1-11">大</li><li datascope="11x5dt2z2_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt2z2_d_sin_1-11">单</li><li datascope="11x5dt2z2_d_dou_1-11">双</li><li datascope="11x5dt2z2_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt2z2_t_01">01</li><li id="11x5dt2z2_t_02">02</li><li id="11x5dt2z2_t_03">03</li>'
				+'<li id="11x5dt2z2_t_04">04</li><li id="11x5dt2z2_t_05">05</li><li id="11x5dt2z2_t_06">06</li><li id="11x5dt2z2_t_07">07</li>'
				+'<li id="11x5dt2z2_t_08">08</li><li id="11x5dt2z2_t_09">09</li><li id="11x5dt2z2_t_10">10</li><li id="11x5dt2z2_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt2z2_t_ful_1-11">全</li><li datascope="11x5dt2z2_t_big_1-11">大</li><li datascope="11x5dt2z2_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt2z2_t_sin_1-11">单</li><li datascope="11x5dt2z2_t_dou_1-11">双</li><li datascope="11x5dt2z2_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '分别从胆码和拖码的01-11中，至少选择1个胆码和1个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和1个拖码，即为中奖。',
			betexample: '选择胆码 08，选择拖码 06，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '分别从胆码和拖码的01-11中，至少选择1个胆码和1个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和1个拖码，即为中奖。',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i])
							{
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
								

					if(d_count==1&&t_count>=1){
						
						var op_flag=false;
						
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									
									var temp_t_dd_ball_number=selected_t_ball_array[mm];
									
									if(temp_t_dd_ball_number!=undefined&&temp_t_dd_ball_number!=""){
										
										if(eval(temp_o_d_ball_number)==eval(temp_t_dd_ball_number)){
											
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							 if(d_count==1){
								if(t_count>=1){
									itemcount=t_count;
								}
							}
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
										
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt2z2_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt3z3":{
			showname: '三中三',
			rulecode: '11x5dt3z3',
			realname: '[胆拖任选_三中三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=4*3/2;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.03,
			minMode:1850,
			startPrice:30.06,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt3z3"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt3z3_d_01">01</li><li id="11x5dt3z3_d_02">02</li><li id="11x5dt3z3_d_03">03</li>'
				+'<li id="11x5dt3z3_d_04">04</li><li id="11x5dt3z3_d_05">05</li><li id="11x5dt3z3_d_06">06</li><li id="11x5dt3z3_d_07">07</li>'
				+'<li id="11x5dt3z3_d_08">08</li><li id="11x5dt3z3_d_09">09</li><li id="11x5dt3z3_d_10">10</li><li id="11x5dt3z3_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt3z3_d_ful_1-11">全</li><li datascope="11x5dt3z3_d_big_1-11">大</li><li datascope="11x5dt3z3_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt3z3_d_sin_1-11">单</li><li datascope="11x5dt3z3_d_dou_1-11">双</li><li datascope="11x5dt3z3_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt3z3_t_01">01</li><li id="11x5dt3z3_t_02">02</li><li id="11x5dt3z3_t_03">03</li>'
				+'<li id="11x5dt3z3_t_04">04</li><li id="11x5dt3z3_t_05">05</li><li id="11x5dt3z3_t_06">06</li><li id="11x5dt3z3_t_07">07</li>'
				+'<li id="11x5dt3z3_t_08">08</li><li id="11x5dt3z3_t_09">09</li><li id="11x5dt3z3_t_10">10</li><li id="11x5dt3z3_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt3z3_t_ful_1-11">全</li><li datascope="11x5dt3z3_t_big_1-11">大</li><li datascope="11x5dt3z3_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt3z3_t_sin_1-11">单</li><li datascope="11x5dt3z3_t_dou_1-11">双</li><li datascope="11x5dt3z3_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '分别从胆码和拖码的01-11中，至少选择1个胆码和2个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和2个拖码，即为中奖。',
			betexample: '选择胆码 08，选择拖码 06 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '分别从胆码和拖码的01-11中，至少选择1个胆码和2个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和2个拖码，即为中奖。',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i])
							{
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					
					var itemcount=0;
						
					if(d_count<=2&&d_count>0){
						var op_flag=false;
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									
									var temp_o_dd_ball_number=selected_t_ball_array[mm];
									
									if(temp_o_dd_ball_number!=undefined&&temp_o_dd_ball_number!=""){
										
										if(eval(temp_o_dd_ball_number)==eval(temp_o_d_ball_number)){
											
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==2){
								if(t_count>=1){
									itemcount=t_count;
								}
							}
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
								
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt3z3_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt4z4":{
			showname: '四中四',
			rulecode: '11x5dt4z4',
			realname: '[胆拖任选_四中四]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=4;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.12,
			minMode:1850,
			startPrice:120,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt4z4"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt4z4_d_01">01</li><li id="11x5dt4z4_d_02">02</li><li id="11x5dt4z4_d_03">03</li>'
				+'<li id="11x5dt4z4_d_04">04</li><li id="11x5dt4z4_d_05">05</li><li id="11x5dt4z4_d_06">06</li><li id="11x5dt4z4_d_07">07</li>'
				+'<li id="11x5dt4z4_d_08">08</li><li id="11x5dt4z4_d_09">09</li><li id="11x5dt4z4_d_10">10</li><li id="11x5dt4z4_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt4z4_d_ful_1-11">全</li><li datascope="11x5dt4z4_d_big_1-11">大</li><li datascope="11x5dt4z4_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt4z4_d_sin_1-11">单</li><li datascope="11x5dt4z4_d_dou_1-11">双</li><li datascope="11x5dt4z4_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt4z4_t_01">01</li><li id="11x5dt4z4_t_02">02</li><li id="11x5dt4z4_t_03">03</li>'
				+'<li id="11x5dt4z4_t_04">04</li><li id="11x5dt4z4_t_05">05</li><li id="11x5dt4z4_t_06">06</li><li id="11x5dt4z4_t_07">07</li>'
				+'<li id="11x5dt4z4_t_08">08</li><li id="11x5dt4z4_t_09">09</li><li id="11x5dt4z4_t_10">10</li><li id="11x5dt4z4_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt4z4_t_ful_1-11">全</li><li datascope="11x5dt4z4_t_big_1-11">大</li><li datascope="11x5dt4z4_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt4z4_t_sin_1-11">单</li><li datascope="11x5dt4z4_t_dou_1-11">双</li><li datascope="11x5dt4z4_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '分别从胆码和拖码的01-11中，至少选择1个胆码和3个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和3个拖码，即为中奖。',
			betexample: '选择胆码 08，选择拖码 06 09 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '分别从胆码和拖码的01-11中，至少选择1个胆码和3个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和3个拖码，即为中奖。 ',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					
					if(d_count<=3&&d_count>0){
						
						var op_flag=false;
						
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									
									var temp_o_t_ball_number=selected_t_ball_array[mm];
									
									if(temp_o_t_ball_number!=undefined&&temp_o_t_ball_number!=""){
										if(eval(temp_o_d_ball_number)==eval(temp_o_t_ball_number)){
											
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=3){
									itemcount=t_count*(t_count-1)*(t_count-2)/(3*2);
								}
							} else if(d_count==2){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==3){
								if(t_count>=1){
									itemcount=t_count;
								}
							}
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
					
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt4z4_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt5z5":{
			showname: '五中五',
			rulecode: '11x5dt5z5',
			realname: '[胆拖任选_五中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.92,
			minMode:1850,
			startPrice:840.24,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt5z5"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt5z5_d_01">01</li><li id="11x5dt5z5_d_02">02</li><li id="11x5dt5z5_d_03">03</li>'
				+'<li id="11x5dt5z5_d_04">04</li><li id="11x5dt5z5_d_05">05</li><li id="11x5dt5z5_d_06">06</li><li id="11x5dt5z5_d_07">07</li>'
				+'<li id="11x5dt5z5_d_08">08</li><li id="11x5dt5z5_d_09">09</li><li id="11x5dt5z5_d_10">10</li><li id="11x5dt5z5_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt5z5_d_ful_1-11">全</li><li datascope="11x5dt5z5_d_big_1-11">大</li><li datascope="11x5dt5z5_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt5z5_d_sin_1-11">单</li><li datascope="11x5dt5z5_d_dou_1-11">双</li><li datascope="11x5dt5z5_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt5z5_t_01">01</li><li id="11x5dt5z5_t_02">02</li><li id="11x5dt5z5_t_03">03</li>'
				+'<li id="11x5dt5z5_t_04">04</li><li id="11x5dt5z5_t_05">05</li><li id="11x5dt5z5_t_06">06</li><li id="11x5dt5z5_t_07">07</li>'
				+'<li id="11x5dt5z5_t_08">08</li><li id="11x5dt5z5_t_09">09</li><li id="11x5dt5z5_t_10">10</li><li id="11x5dt5z5_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt5z5_t_ful_1-11">全</li><li datascope="11x5dt5z5_t_big_1-11">大</li><li datascope="11x5dt5z5_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt5z5_t_sin_1-11">单</li><li datascope="11x5dt5z5_t_dou_1-11">双</li><li datascope="11x5dt5z5_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '分别从胆码和拖码的01-11中，至少选择1个胆码和4个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和4个拖码，即为中奖。 ',
			betexample: '选择胆码 08，选择拖码 02 06 09 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '分别从胆码和拖码的01-11中，至少选择1个胆码和4个拖码组成一注，只要当期顺序摇出的5个开奖号码中同时包含所选的1个胆码和4个拖码，即为中奖。 ',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					
					var itemcount=0;

					if(d_count<=4&&d_count>0){
						
						var op_flag=false;
						
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									
									var temp_o_t_ball_number=selected_t_ball_array[mm];
									
									if(temp_o_t_ball_number!=undefined&&temp_o_t_ball_number!=""){
										if(eval(temp_o_d_ball_number)==eval(temp_o_t_ball_number)){
											
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=4){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)/(4*3*2);
								}
							} else if(d_count==2){
								if(t_count>=3){
									itemcount=t_count*(t_count-1)*(t_count-2)/(3*2);
								}
							} else if(d_count==3){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==4){
								if(t_count>=1){
									itemcount=t_count;
								}
							}
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
					
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt5z5_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt6z5":{
			showname: '六中五',
			rulecode: '11x5dt6z5',
			realname: '[胆拖任选_六中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6;
				
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				}else{
					return currentRecodNumber;
				}
			},
			fixed: 0.15,
			minMode:1850,
			startPrice:140,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt6z5"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt6z5_d_01">01</li><li id="11x5dt6z5_d_02">02</li><li id="11x5dt6z5_d_03">03</li>'
				+'<li id="11x5dt6z5_d_04">04</li><li id="11x5dt6z5_d_05">05</li><li id="11x5dt6z5_d_06">06</li><li id="11x5dt6z5_d_07">07</li>'
				+'<li id="11x5dt6z5_d_08">08</li><li id="11x5dt6z5_d_09">09</li><li id="11x5dt6z5_d_10">10</li><li id="11x5dt6z5_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt6z5_d_ful_1-11">全</li><li datascope="11x5dt6z5_d_big_1-11">大</li><li datascope="11x5dt6z5_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt6z5_d_sin_1-11">单</li><li datascope="11x5dt6z5_d_dou_1-11">双</li><li datascope="11x5dt6z5_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt6z5_t_01">01</li><li id="11x5dt6z5_t_02">02</li><li id="11x5dt6z5_t_03">03</li>'
				+'<li id="11x5dt6z5_t_04">04</li><li id="11x5dt6z5_t_05">05</li><li id="11x5dt6z5_t_06">06</li><li id="11x5dt6z5_t_07">07</li>'
				+'<li id="11x5dt6z5_t_08">08</li><li id="11x5dt6z5_t_09">09</li><li id="11x5dt6z5_t_10">10</li><li id="11x5dt6z5_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt6z5_t_ful_1-11">全</li><li datascope="11x5dt6z5_t_big_1-11">大</li><li datascope="11x5dt6z5_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt6z5_t_sin_1-11">单</li><li datascope="11x5dt6z5_t_dou_1-11">双</li><li datascope="11x5dt6z5_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择6个及以上号码进行投注，每注需至少包括1个胆码及5个拖码',
			betexample: '选择胆码 08，选择拖码 01 02 05 06 09 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '从01-11共11个号码中选择6个及以上号码进行投注，每注需至少包括1个胆码及5个拖码。只要当期顺序摇出的5个号码中包含所选单注号码（胆码加拖码），即为中奖',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					
					var itemcount=0;
													
					if(d_count<=5&&d_count>0){
						var op_flag=false;
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									var temp_o_t_ball_number=selected_t_ball_array[mm];
									if(temp_o_t_ball_number!=undefined&&temp_o_t_ball_number!=""){
										if(eval(temp_o_d_ball_number)==eval(temp_o_t_ball_number)){
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=5){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)/(5*4*3*2);
								}
							} else if(d_count==2){
								if(t_count>=4){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)/(4*3*2);
								}
							} else if(d_count==3){
								if(t_count>=3){
									itemcount=t_count*(t_count-1)*(t_count-2)/(3*2);
								}
							} else if(d_count==4){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==5){
								if(t_count>=1){
									itemcount=t_count;
								}
							}/*else if(clear_selected_d_ball_array.length==5){
								if(clear_selected_t_ball_array.length>=1){
									itemcount=clear_selected_t_ball_array.length;
								}
							}*/
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
										
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt6z5_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt7z5":{
			showname: '七中五',
			rulecode: '11x5dt7z5',
			realname: '[胆拖任选_七中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6*5/2;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				}else{
					return currentRecodNumber;
				}
			},
			fixed: 0.04,
			minMode:1850,
			startPrice:40.05,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt7z5"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt7z5_d_01">01</li><li id="11x5dt7z5_d_02">02</li><li id="11x5dt7z5_d_03">03</li>'
				+'<li id="11x5dt7z5_d_04">04</li><li id="11x5dt7z5_d_05">05</li><li id="11x5dt7z5_d_06">06</li><li id="11x5dt7z5_d_07">07</li>'
				+'<li id="11x5dt7z5_d_08">08</li><li id="11x5dt7z5_d_09">09</li><li id="11x5dt7z5_d_10">10</li><li id="11x5dt7z5_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt7z5_d_ful_1-11">全</li><li datascope="11x5dt7z5_d_big_1-11">大</li><li datascope="11x5dt7z5_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt7z5_d_sin_1-11">单</li><li datascope="11x5dt7z5_d_dou_1-11">双</li><li datascope="11x5dt7z5_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt7z5_t_01">01</li><li id="11x5dt7z5_t_02">02</li><li id="11x5dt7z5_t_03">03</li>'
				+'<li id="11x5dt7z5_t_04">04</li><li id="11x5dt7z5_t_05">05</li><li id="11x5dt7z5_t_06">06</li><li id="11x5dt7z5_t_07">07</li>'
				+'<li id="11x5dt7z5_t_08">08</li><li id="11x5dt7z5_t_09">09</li><li id="11x5dt7z5_t_10">10</li><li id="11x5dt7z5_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt7z5_t_ful_1-11">全</li><li datascope="11x5dt7z5_t_big_1-11">大</li><li datascope="11x5dt7z5_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt7z5_t_sin_1-11">单</li><li datascope="11x5dt7z5_t_dou_1-11">双</li><li datascope="11x5dt7z5_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择7个及以上号码进行投注，每注需至少包括1个胆码及6个拖码',
			betexample: '选择胆码 08，选择拖码 01 02 05 06 07 09 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '从01-11共11个号码中选择7个及以上号码进行投注，每注需至少包括1个胆码及6个拖码。只要当期顺序摇出的5个号码中包含所选单注号码（胆码加拖码），即为中奖',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;

					if(d_count<=6&&d_count>0){
						var op_flag=false;
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									var temp_o_t_ball_number=selected_t_ball_array[mm];
									if(temp_o_t_ball_number!=undefined&&temp_o_t_ball_number!=""){
										if(eval(temp_o_d_ball_number)==eval(temp_o_t_ball_number)){
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=6){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)*(t_count-5)/(6*5*4*3*2);
								}
							} else if(d_count==2){
								if(t_count>=5){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)/(5*4*3*2);
								}
							} else if(d_count==3){
								if(t_count>=4){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)/(4*3*2);
								}
							} else if(d_count==4){
								if(t_count>=3){
									itemcount=t_count*(t_count-1)*(t_count-2)/(3*2);
								}
							} else if(d_count==5){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==6){
								if(t_count>=1){
									itemcount=t_count;
								}
							}/*else if(clear_selected_d_ball_array.length==5){
								if(clear_selected_t_ball_array.length>=2){
									itemcount=clear_selected_t_ball_array.length*(clear_selected_t_ball_array.length-1)/2;
								}
							}else if(clear_selected_d_ball_array.length==6){
								if(clear_selected_t_ball_array.length>=1){
									itemcount=clear_selected_t_ball_array.length;
								}
							}*/
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
										
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt7z5_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dt8z5":{
			showname: '八中五',
			rulecode: '11x5dt8z5',
			realname: '[胆拖任选_八中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6*5*4/(3*2);
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				}else{
					return currentRecodNumber;
				}
			},
			fixed: 0.02,
			minMode:1850,
			startPrice:15,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dt8z5"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt8z5_d_01">01</li><li id="11x5dt8z5_d_02">02</li><li id="11x5dt8z5_d_03">03</li>'
				+'<li id="11x5dt8z5_d_04">04</li><li id="11x5dt8z5_d_05">05</li><li id="11x5dt8z5_d_06">06</li><li id="11x5dt8z5_d_07">07</li>'
				+'<li id="11x5dt8z5_d_08">08</li><li id="11x5dt8z5_d_09">09</li><li id="11x5dt8z5_d_10">10</li><li id="11x5dt8z5_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt8z5_d_ful_1-11">全</li><li datascope="11x5dt8z5_d_big_1-11">大</li><li datascope="11x5dt8z5_d_sma_1-11">小</li>'
				+'<li datascope="11x5dt8z5_d_sin_1-11">单</li><li datascope="11x5dt8z5_d_dou_1-11">双</li><li datascope="11x5dt8z5_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dt8z5_t_01">01</li><li id="11x5dt8z5_t_02">02</li><li id="11x5dt8z5_t_03">03</li>'
				+'<li id="11x5dt8z5_t_04">04</li><li id="11x5dt8z5_t_05">05</li><li id="11x5dt8z5_t_06">06</li><li id="11x5dt8z5_t_07">07</li>'
				+'<li id="11x5dt8z5_t_08">08</li><li id="11x5dt8z5_t_09">09</li><li id="11x5dt8z5_t_10">10</li><li id="11x5dt8z5_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dt8z5_t_ful_1-11">全</li><li datascope="11x5dt8z5_t_big_1-11">大</li><li datascope="11x5dt8z5_t_sma_1-11">小</li>'
				+'<li datascope="11x5dt8z5_t_sin_1-11">单</li><li datascope="11x5dt8z5_t_dou_1-11">双</li><li datascope="11x5dt8z5_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择8个及以上号码进行投注，每注需至少包括1个胆码及7个拖码',
			betexample: '选择胆码 08，选择拖码 01 02 03 05 06 07 09 11，开奖号码为 06 08 11 09 02，即为中奖。',
			bethelp: '从01-11共11个号码中选择8个及以上号码进行投注，每注需至少包括1个胆码及7个拖码。只要当期顺序摇出的5个号码中包含所选单注号码（胆码加拖码），即为中奖',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var selected_d_ball_array=way.get(this.rulecode + ".balls.d");
					var selected_t_ball_array=way.get(this.rulecode + ".balls.t");
					if(selected_d_ball_array&&selected_d_ball_array.length>0&&selected_t_ball_array&&selected_t_ball_array.length>0){
						var isfor=true;
						for(i=0;isfor&&i<selected_d_ball_array.length;i++)
							if(selected_d_ball_array[i])
								for(j=0;j<selected_t_ball_array.length;j++)
									if(selected_t_ball_array[j]&&selected_t_ball_array[j]==selected_d_ball_array[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;

					if(d_count<=7&&d_count>0){
						var op_flag=false;
						for(var oo=0;oo<selected_d_ball_array.length;oo++){
							var temp_o_d_ball_number=selected_d_ball_array[oo];
							if(temp_o_d_ball_number!=undefined&&temp_o_d_ball_number!=""){
								for(var mm=0;mm<selected_t_ball_array.length;mm++){
									var temp_o_t_ball_number=selected_t_ball_array[mm];
									if(temp_o_t_ball_number!=undefined&&temp_o_t_ball_number!=""){
										if(eval(temp_o_d_ball_number)==eval(temp_o_t_ball_number)){
											op_flag=true;
											break;
										}
									}
								}
							}
							
							if(op_flag==true){
								break;
							}
						}
						
						if(op_flag==false){
							if(d_count==1){
								if(t_count>=7){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)*(t_count-5)*(t_count-6)/(7*6*5*4*3*2);
								}
							} else if(d_count==2){
								if(t_count>=6){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)*(t_count-5)/(6*5*4*3*2);
								}
							} else if(d_count==3){
								if(t_count>=5){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)*(t_count-4)/(5*4*3*2);
								}
							} else if(d_count==4){
								if(t_count>=4){
									itemcount=t_count*(t_count-1)*(t_count-2)*(t_count-3)/(4*3*2);
								}
							} else if(d_count==5){
								if(t_count>=3){
									itemcount=t_count*(t_count-1)*(t_count-2)/(3*2);
								}
							} else if(d_count==6){
								if(t_count>=2){
									itemcount=t_count*(t_count-1)/2;
								}
							} else if(d_count==7){
								if(t_count>=1){
									itemcount=t_count;
								}
							}/*else if(clear_selected_d_ball_array.length==5){
								
								if(clear_selected_t_ball_array.length>=3){
									
									itemcount=clear_selected_t_ball_array.length*(clear_selected_t_ball_array.length-1)*(clear_selected_t_ball_array.length-2)/(3*2);

								}
								
							}else if(clear_selected_d_ball_array.length==6){
								
								
								if(clear_selected_t_ball_array.length>=2){
									
									itemcount=clear_selected_t_ball_array.length*(clear_selected_t_ball_array.length-1)/2;

								}
								
							}else if(clear_selected_d_ball_array.length==7){
								
								if(clear_selected_t_ball_array.length>=1){
									
									itemcount=clear_selected_t_ball_array.length;

								}
							}*/
						 }
					}
					if(itemcount==0){
						itemcount="0";
					} else {
						itemcount=parseInt(itemcount);
					}
										
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total",  total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#11x5dt8z5_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5hsfs": {
			showname: '复式',
			rulecode: '11x5hsfs',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			realname: '[后三星直选_复式]',
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hsfs">'
				+ '<dd><h5>百位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hsfs_b_01">01</li><li id="11x5hsfs_b_02">02</li><li id="11x5hsfs_b_03">03</li>'
				+'<li id="11x5hsfs_b_04">04</li><li id="11x5hsfs_b_05">05</li><li id="11x5hsfs_b_06">06</li><li id="11x5hsfs_b_07">07</li>'
				+'<li id="11x5hsfs_b_08">08</li><li id="11x5hsfs_b_09">09</li><li id="11x5hsfs_b_10">10</li><li id="11x5hsfs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hsfs_b_ful_1-11">全</li><li datascope="11x5hsfs_b_big_1-11">大</li><li datascope="11x5hsfs_b_sma_1-11">小</li>'
				+'<li datascope="11x5hsfs_b_sin_1-11">单</li><li datascope="11x5hsfs_b_dou_1-11">双</li><li datascope="11x5hsfs_b_cle_1-11">清</li></ul></dd>'
				+'<dd><h5>十位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5hsfs_s_01">01</li><li id="11x5hsfs_s_02">02</li><li id="11x5hsfs_s_03">03</li>'
				+'<li id="11x5hsfs_s_04">04</li><li id="11x5hsfs_s_05">05</li><li id="11x5hsfs_s_06">06</li><li id="11x5hsfs_s_07">07</li>'
				+'<li id="11x5hsfs_s_08">08</li><li id="11x5hsfs_s_09">09</li><li id="11x5hsfs_s_10">10</li><li id="11x5hsfs_s_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hsfs_s_ful_1-11">全</li><li datascope="11x5hsfs_s_big_1-11">大</li><li datascope="11x5hsfs_s_sma_1-11">小</li>'
				+'<li datascope="11x5hsfs_s_sin_1-11">单</li><li datascope="11x5hsfs_s_dou_1-11">双</li><li datascope="11x5hsfs_s_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>个位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hsfs_g_01">01</li><li id="11x5hsfs_g_02">02</li><li id="11x5hsfs_g_03">03</li>'
				+'<li id="11x5hsfs_g_04">04</li><li id="11x5hsfs_g_05">05</li><li id="11x5hsfs_g_06">06</li><li id="11x5hsfs_g_07">07</li>'
				+'<li id="11x5hsfs_g_08">08</li><li id="11x5hsfs_g_09">09</li><li id="11x5hsfs_g_10">10</li><li id="11x5hsfs_g_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hsfs_g_ful_1-11">全</li><li datascope="11x5hsfs_g_big_1-11">大</li><li datascope="11x5hsfs_g_sma_1-11">小</li>'
				+'<li datascope="11x5hsfs_g_sin_1-11">单</li><li datascope="11x5hsfs_g_dou_1-11">双</li><li datascope="11x5hsfs_g_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从百、十、个位各选一个号码组成一注。',
			betexample: '投注方案：* * 02 03 04；开奖号码：* * 02 03 04',
			bethelp: '从百、十、个位位中选择一个3位数号码组成一注，所选号码与开奖号码的百位、十位、个位相同，且顺序一致，即为中奖。',
			formatBalls : function(balls) {
				return formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.b") || !way.get(this.rulecode + ".count.s") || !way.get(this.rulecode + ".count.g")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballb = way.get(this.rulecode + ".balls.b");
					var balls = way.get(this.rulecode + ".balls.s");
					var ballg = way.get(this.rulecode + ".balls.g");
					  var itemcount = 0;
				        for (var i = 0; i < ballb.length; i++) {
				            for (var j = 0; j < balls.length; j++) {
				                for (var k = 0; k < ballg.length; k++) {
				                	if(ballb[i]!=undefined&&balls[j]!=undefined&&ballg[k]!=undefined&&ballb[i]!=""&&balls[j]!=""&&ballg[k]!=""){
					                    if (ballb[i] != balls[j] && ballb[i] != ballg[k] && balls[j] != ballg[k]) {
					                    	itemcount++;
					                    }
				                	}
				                }
				            }
				        }
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b","s","g"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5hsds":{
			showname: '单式',
			rulecode: '11x5hsds',
			realname: '[后三星直选_单式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 2,
			minMode:1850,
			startPrice:1820,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入3个号码组成一注。',
			betexample: '投注方案：* * 020304； 开奖号码：* * 02 03 04，即中前三星直选一等奖',
			bethelp: '手动输入号码，从01-11中任意输入3个号码组成一注，所选号码与开奖号码的百位、十位、个位相同，且顺序一致，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v=way.get("Lottery.context");
					var reg=/(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz=util_unique(v, reg, 2);
					sszz = sszz.sort();
					if(sszz){
						itemcount=sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total) {
						way.set("Lottery.total", total.toFixed(4));
					} else { 
						way.set("Lottery.total", "0");
					}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k=String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' '&&k!=','&&k!=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context","");
			}
		},
		"11x5qszx": {
			showname: '前三',
			rulecode: '11x5qszx',
			realname: '[三星组选_前三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:303,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qszx">'
				+ '<dd><h5>前三组选</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qszx_b_01">01</li><li id="11x5qszx_b_02">02</li><li id="11x5qszx_b_03">03</li>'
				+'<li id="11x5qszx_b_04">04</li><li id="11x5qszx_b_05">05</li><li id="11x5qszx_b_06">06</li><li id="11x5qszx_b_07">07</li>'
				+'<li id="11x5qszx_b_08">08</li><li id="11x5qszx_b_09">09</li><li id="11x5qszx_b_10">10</li><li id="11x5qszx_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qszx_b_ful_1-11">全</li><li datascope="11x5qszx_b_big_1-11">大</li><li datascope="11x5qszx_b_sma_1-11">小</li>'
				+'<li datascope="11x5qszx_b_sin_1-11">单</li><li datascope="11x5qszx_b_dou_1-11">双</li><li datascope="11x5qszx_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的万位、千位、百位相同，且顺序不限，即为中奖。',
			betexample: '如：选择01 02 03（展开为01 02 03 * *、01 03 02 * *和* 03 02 01 * *，），开奖号码为01 02 03 * * 或 01 03 02 * *或者03 02 01 * *，即为中奖。',
			bethelp: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的万位、千位、百位相同，且顺序不限，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>2){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)/6;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5qsdt":{
			showname: '组三',
			rulecode: '11x5qsdt',
			realname: '[前三星_组三胆拖]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:600,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qsdt"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qsdt_d_01">01</li><li id="11x5qsdt_d_02">02</li><li id="11x5qsdt_d_03">03</li>'
				+'<li id="11x5qsdt_d_04">04</li><li id="11x5qsdt_d_05">05</li><li id="11x5qsdt_d_06">06</li><li id="11x5qsdt_d_07">07</li>'
				+'<li id="11x5qsdt_d_08">08</li><li id="11x5qsdt_d_09">09</li><li id="11x5qsdt_d_10">10</li><li id="11x5qsdt_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qsdt_d_ful_1-11">全</li><li datascope="11x5qsdt_d_big_1-11">大</li><li datascope="11x5qsdt_d_sma_1-11">小</li>'
				+'<li datascope="11x5qsdt_d_sin_1-11">单</li><li datascope="11x5qsdt_d_dou_1-11">双</li><li datascope="11x5qsdt_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qsdt_t_01">01</li><li id="11x5qsdt_t_02">02</li><li id="11x5qsdt_t_03">03</li>'
				+'<li id="11x5qsdt_t_04">04</li><li id="11x5qsdt_t_05">05</li><li id="11x5qsdt_t_06">06</li><li id="11x5qsdt_t_07">07</li>'
				+'<li id="11x5qsdt_t_08">08</li><li id="11x5qsdt_t_09">09</li><li id="11x5qsdt_t_10">10</li><li id="11x5qsdt_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qsdt_t_ful_1-11">全</li><li datascope="11x5qsdt_t_big_1-11">大</li><li datascope="11x5qsdt_t_sma_1-11">小</li>'
				+'<li datascope="11x5qsdt_t_sin_1-11">单</li><li datascope="11x5qsdt_t_dou_1-11">双</li><li datascope="11x5qsdt_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中，选取3个及以上的号码进行投注，每注需选择1个胆码及2个拖码或者2个胆码及一个拖码。开奖号码前三位与选择的号码相同即中奖。',
			betexample: '如投注的胆码是01，拖码是02 和03，开奖号码是01 03 02 05 04，即中奖。',
			bethelp: '每注需选择1个胆码及2个拖码或者2个胆码及一个拖码',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balld = way.get(this.rulecode + ".balls.d");
					var ballt = way.get(this.rulecode + ".balls.t");
					
					if(balld&&balld.length>0&&ballt&&ballt.length>0){
						var isfor=true;
						for(i=0;isfor&&i<balld.length;i++)
							if(balld[i])
								for(j=0;j<ballt.length;j++)
									if(ballt[j]&&ballt[j]==balld[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					var b=true;
					for (var i = 0; i < ballt.length; i++) {
						if(ballt[i]!=""){
							for(var j=0;j<balld.length;j++)
					         if(ballt[i]==balld[j]&&balld[j]!=null){
					        	 b=false;
					        	 break;
					         }
						}
				    }
					if(b){
						if(d_count==1&&t_count>1){
							itemcount=parseInt(t_count)*(parseInt(t_count)-1)/2;
						}
						if(d_count==2&&t_count>=1){
							itemcount=parseInt(t_count);
						}
						way.set("Lottery.itemcount", ""+itemcount);
						var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
						if (total)
							way.set("Lottery.total",  total.toFixed(4));
						else{
							way.set("Lottery.total", "0");
							way.set("Lottery.itemcount", "0");
						}
					}else{
						way.set("Lottery.total", "0");
						way.set("Lottery.itemcount", "0");
					}
					
				} else {
					way.set("Lottery.total", "0");
					way.set("Lottery.itemcount", "0");
				}
				
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5zszx": {
			showname: '中三',
			rulecode: '11x5zszx',
			realname: '[三星组选_中三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:303,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5zszx">'
				+ '<dd><h5>中三组选</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5zszx_b_01">01</li><li id="11x5zszx_b_02">02</li><li id="11x5zszx_b_03">03</li>'
				+'<li id="11x5zszx_b_04">04</li><li id="11x5zszx_b_05">05</li><li id="11x5zszx_b_06">06</li><li id="11x5zszx_b_07">07</li>'
				+'<li id="11x5zszx_b_08">08</li><li id="11x5zszx_b_09">09</li><li id="11x5zszx_b_10">10</li><li id="11x5zszx_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zszx_b_ful_1-11">全</li><li datascope="11x5zszx_b_big_1-11">大</li><li datascope="11x5zszx_b_sma_1-11">小</li>'
				+'<li datascope="11x5zszx_b_sin_1-11">单</li><li datascope="11x5zszx_b_dou_1-11">双</li><li datascope="11x5zszx_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的千位、百位、十位相同，且顺序不限，即为中奖。',
			betexample: '如：选择01 02 03（展开为* 01 02 03 *、* 01 03 02*和* 03 02 01 *，），开奖号码为* 01 02 03 * 或 * 01 03 02 *或者* 03 02 01 *，即为中奖。',
			bethelp: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的千位、百位、十位相同，且顺序不限，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>2){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)/6;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5zsdt":{
			showname: '组三',
			rulecode: '11x5zsdt',
			realname: '[中三星_组三胆拖]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:600,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5zsdt"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5zsdt_d_01">01</li><li id="11x5zsdt_d_02">02</li><li id="11x5zsdt_d_03">03</li>'
				+'<li id="11x5zsdt_d_04">04</li><li id="11x5zsdt_d_05">05</li><li id="11x5zsdt_d_06">06</li><li id="11x5zsdt_d_07">07</li>'
				+'<li id="11x5zsdt_d_08">08</li><li id="11x5zsdt_d_09">09</li><li id="11x5zsdt_d_10">10</li><li id="11x5zsdt_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zsdt_d_ful_1-11">全</li><li datascope="11x5zsdt_d_big_1-11">大</li><li datascope="11x5zsdt_d_sma_1-11">小</li>'
				+'<li datascope="11x5zsdt_d_sin_1-11">单</li><li datascope="11x5zsdt_d_dou_1-11">双</li><li datascope="11x5zsdt_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5zsdt_t_01">01</li><li id="11x5zsdt_t_02">02</li><li id="11x5zsdt_t_03">03</li>'
				+'<li id="11x5zsdt_t_04">04</li><li id="11x5zsdt_t_05">05</li><li id="11x5zsdt_t_06">06</li><li id="11x5zsdt_t_07">07</li>'
				+'<li id="11x5zsdt_t_08">08</li><li id="11x5zsdt_t_09">09</li><li id="11x5zsdt_t_10">10</li><li id="11x5zsdt_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5zsdt_t_ful_1-11">全</li><li datascope="11x5zsdt_t_big_1-11">大</li><li datascope="11x5zsdt_t_sma_1-11">小</li>'
				+'<li datascope="11x5zsdt_t_sin_1-11">单</li><li datascope="11x5zsdt_t_dou_1-11">双</li><li datascope="11x5zsdt_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中，选取3个及以上的号码进行投注，每注需选择1个胆码及2个拖码或者2个胆码及一个拖码。开奖号码中间三位与选择的号码相同即中奖。',
			betexample: '如投注的胆码是01，拖码是02和 05，开奖号码是03 01 05 02 04，即中奖。',
			bethelp: '每注需选择1个胆码及2个拖码或者2个胆码及一个拖码',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balld = way.get(this.rulecode + ".balls.d");
					var ballt = way.get(this.rulecode + ".balls.t");
					
					if(balld&&balld.length>0&&ballt&&ballt.length>0){
						var isfor=true;
						for(i=0;isfor&&i<balld.length;i++)
							if(balld[i])
								for(j=0;j<ballt.length;j++)
									if(ballt[j]&&ballt[j]==balld[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					var b=true;
					for (var i = 0; i < ballt.length; i++) {
						if(ballt[i]!=""){
							for(var j=0;j<balld.length;j++)
					         if(ballt[i]==balld[j]&&balld[j]!=null){
					        	 b=false;
					        	 break;
					         }
						}
				    }
					if(b){
						if(d_count==1&&t_count>1){
							itemcount=parseInt(t_count)*(parseInt(t_count)-1)/2;
						}
						if(d_count==2&&t_count>=1){
							itemcount=parseInt(t_count);
						}
						way.set("Lottery.itemcount", ""+itemcount);
						var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
						if (total)
							way.set("Lottery.total",  total.toFixed(4));
						else{
							way.set("Lottery.total", "0");
							way.set("Lottery.itemcount", "0");
						}
					}else{
						way.set("Lottery.total", "0");
						way.set("Lottery.itemcount", "0");
					}
					
				} else {
					way.set("Lottery.total", "0");
					way.set("Lottery.itemcount", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5hszx": {
			showname: '后三',
			rulecode: '11x5hszx',
			realname: '[三星组选_后三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:303,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hszx">'
				+ '<dd><h5>后三组选</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hszx_b_01">01</li><li id="11x5hszx_b_02">02</li><li id="11x5hszx_b_03">03</li>'
				+'<li id="11x5hszx_b_04">04</li><li id="11x5hszx_b_05">05</li><li id="11x5hszx_b_06">06</li><li id="11x5hszx_b_07">07</li>'
				+'<li id="11x5hszx_b_08">08</li><li id="11x5hszx_b_09">09</li><li id="11x5hszx_b_10">10</li><li id="11x5hszx_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hszx_b_ful_1-11">全</li><li datascope="11x5hszx_b_big_1-11">大</li><li datascope="11x5hszx_b_sma_1-11">小</li>'
				+'<li datascope="11x5hszx_b_sin_1-11">单</li><li datascope="11x5hszx_b_dou_1-11">双</li><li datascope="11x5hszx_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的百位、十位、个位相同，且顺序不限，即为中奖。',
			betexample: '如：选择01 02 03（展开为* * 01 02 03、* * 01 03 02和* * 03 02 01，），开奖号码为* * 01 02 03 或 * * 01 03 02或者* * 03 02 01，即为中奖。',
			bethelp: '01-11中任意选择3个号码组成一注，所选号码与开奖号码的百位、十位、个位相同，且顺序不限，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>2){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)/6;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5hsdt":{
			showname: '组三',
			rulecode: '11x5hsdt',
			realname: '[后三星_组三胆拖]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.34,
			minMode:1850,
			startPrice:600,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hsdt"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hsdt_d_01">01</li><li id="11x5hsdt_d_02">02</li><li id="11x5hsdt_d_03">03</li>'
				+'<li id="11x5hsdt_d_04">04</li><li id="11x5hsdt_d_05">05</li><li id="11x5hsdt_d_06">06</li><li id="11x5hsdt_d_07">07</li>'
				+'<li id="11x5hsdt_d_08">08</li><li id="11x5hsdt_d_09">09</li><li id="11x5hsdt_d_10">10</li><li id="11x5hsdt_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hsdt_d_ful_1-11">全</li><li datascope="11x5hsdt_d_big_1-11">大</li><li datascope="11x5hsdt_d_sma_1-11">小</li>'
				+'<li datascope="11x5hsdt_d_sin_1-11">单</li><li datascope="11x5hsdt_d_dou_1-11">双</li><li datascope="11x5hsdt_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hsdt_t_01">01</li><li id="11x5hsdt_t_02">02</li><li id="11x5hsdt_t_03">03</li>'
				+'<li id="11x5hsdt_t_04">04</li><li id="11x5hsdt_t_05">05</li><li id="11x5hsdt_t_06">06</li><li id="11x5hsdt_t_07">07</li>'
				+'<li id="11x5hsdt_t_08">08</li><li id="11x5hsdt_t_09">09</li><li id="11x5hsdt_t_10">10</li><li id="11x5hsdt_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hsdt_t_ful_1-11">全</li><li datascope="11x5hsdt_t_big_1-11">大</li><li datascope="11x5hsdt_t_sma_1-11">小</li>'
				+'<li datascope="11x5hsdt_t_sin_1-11">单</li><li datascope="11x5hsdt_t_dou_1-11">双</li><li datascope="11x5hsdt_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中，选取3个及以上的号码进行投注，每注需选择1个胆码及2个拖码或者2个胆码及一个拖码。开奖号码后三位与选择的号码相同即中奖。',
			betexample: '如投注的胆码是01，拖码是02和05，开奖号码是03 04 05 01 02，即中奖。',
			bethelp: '每注需选择1个胆码及2个拖码或者2个胆码及一个拖码',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balld = way.get(this.rulecode + ".balls.d");
					var ballt = way.get(this.rulecode + ".balls.t");
					
					if(balld&&balld.length>0&&ballt&&ballt.length>0){
						var isfor=true;
						for(i=0;isfor&&i<balld.length;i++)
							if(balld[i])
								for(j=0;j<ballt.length;j++)
									if(ballt[j]&&ballt[j]==balld[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					var b=true;
					for (var i = 0; i < ballt.length; i++) {
						if(ballt[i]!=""){
							for(var j=0;j<balld.length;j++)
					         if(ballt[i]==balld[j]&&balld[j]!=null){
					        	 b=false;
					        	 break;
					         }
						}
				    }
					if(b){
						if(d_count==1&&t_count>1){
							itemcount=parseInt(t_count)*(parseInt(t_count)-1)/2;
						}
						if(d_count==2&&t_count>=1){
							itemcount=parseInt(t_count);
						}
						way.set("Lottery.itemcount", ""+itemcount);
						var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
						if (total)
							way.set("Lottery.total",  total.toFixed(4));
						else{
							way.set("Lottery.total", "0");
							way.set("Lottery.itemcount", "0");
						}
					}else{
						way.set("Lottery.total", "0");
						way.set("Lottery.itemcount", "0");
					}
					
				} else {
					way.set("Lottery.total", "0");
					way.set("Lottery.itemcount", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5qefs": {
			showname: '复式',
			rulecode: '11x5qefs',
			realname: '[前二星直选_复式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qefs"><dd><h5>万位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5qefs_w_01">01</li><li id="11x5qefs_w_02">02</li><li id="11x5qefs_w_03">03</li>'
				+'<li id="11x5qefs_w_04">04</li><li id="11x5qefs_w_05">05</li><li id="11x5qefs_w_06">06</li><li id="11x5qefs_w_07">07</li>'
				+'<li id="11x5qefs_w_08">08</li><li id="11x5qefs_w_09">09</li><li id="11x5qefs_w_10">10</li><li id="11x5qefs_w_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qefs_w_ful_1-11">全</li><li datascope="11x5qefs_w_big_1-11">大</li><li datascope="11x5qefs_w_sma_1-11">小</li>'
				+'<li datascope="11x5qefs_w_sin_1-11">单</li><li datascope="11x5qefs_w_dou_1-11">双</li><li datascope="11x5qefs_w_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>千位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qefs_q_01">01</li><li id="11x5qefs_q_02">02</li><li id="11x5qefs_q_03">03</li>'
				+'<li id="11x5qefs_q_04">04</li><li id="11x5qefs_q_05">05</li><li id="11x5qefs_q_06">06</li><li id="11x5qefs_q_07">07</li>'
				+'<li id="11x5qefs_q_08">08</li><li id="11x5qefs_q_09">09</li><li id="11x5qefs_q_10">10</li><li id="11x5qefs_q_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qefs_q_ful_1-11">全</li><li datascope="11x5qefs_q_big_1-11">大</li><li datascope="11x5qefs_q_sma_1-11">小</li>'
				+'<li datascope="11x5qefs_q_sin_1-11">单</li><li datascope="11x5qefs_q_dou_1-11">双</li><li datascope="11x5qefs_q_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从万、千位各选一个号码组成一注。',
			betexample: '投注方案：02 03 * * *；开奖号码：02 03 * * *',
			bethelp: '从万位、千位中选择一个2位数号码组成一注，所选号码与开奖号码的万位、千位相同，且顺序一致，即为中奖。',
			formatBalls : function(balls) {
				return formatBall(balls['w'])+','+formatBall(balls['q']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.w") || !way.get(this.rulecode + ".count.q")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballw = way.get(this.rulecode + ".balls.w");
					var ballq = way.get(this.rulecode + ".balls.q");
					  var itemcount = 0;
				        for (var i = 0; i < ballw.length; i++) {
				            for (var j = 0; j < ballq.length; j++) {
				                	if(ballw[i]!=undefined&&ballq[j]!=undefined&&ballw[i]!=""&&ballq[j]!=""){
					                    if (ballw[i] != ballq[j]) {
					                    	itemcount++;
					                    }
				                	}
				            }
				        }
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["w","q"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5qeds":{
			showname: '单式',
			rulecode: '11x5qeds',
			realname: '[前二星直选_单式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入2个号码组成一注。',
			betexample: '投注方案：0203 * * *； 开奖号码：02 03 * * *，即中前二星直选一等奖',
			bethelp: '手动输入号码，从01-11中任意输入2个号码组成一注，所选号码与开奖号码的万位、千位相同，且顺序一致，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v=way.get("Lottery.context");
					var reg=/(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz=util_unique(v, reg, 2);
					sszz = sszz.sort();
					if(sszz){
						itemcount=sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k=String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' '&&k!=','&&k!=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}

		},
		"11x5hefs": {
			showname: '复式',
			rulecode: '11x5hefs',
			realname: '[后二星直选_复式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hefs">'
				+'<dd><h5>十位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5hefs_s_01">01</li><li id="11x5hefs_s_02">02</li><li id="11x5hefs_s_03">03</li>'
				+'<li id="11x5hefs_s_04">04</li><li id="11x5hefs_s_05">05</li><li id="11x5hefs_s_06">06</li><li id="11x5hefs_s_07">07</li>'
				+'<li id="11x5hefs_s_08">08</li><li id="11x5hefs_s_09">09</li><li id="11x5hefs_s_10">10</li><li id="11x5hefs_s_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hefs_s_ful_1-11">全</li><li datascope="11x5hefs_s_big_1-11">大</li><li datascope="11x5hefs_s_sma_1-11">小</li>'
				+'<li datascope="11x5hefs_s_sin_1-11">单</li><li datascope="11x5hefs_s_dou_1-11">双</li><li datascope="11x5hefs_s_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>个位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hefs_g_01">01</li><li id="11x5hefs_g_02">02</li><li id="11x5hefs_g_03">03</li>'
				+'<li id="11x5hefs_g_04">04</li><li id="11x5hefs_g_05">05</li><li id="11x5hefs_g_06">06</li><li id="11x5hefs_g_07">07</li>'
				+'<li id="11x5hefs_g_08">08</li><li id="11x5hefs_g_09">09</li><li id="11x5hefs_g_10">10</li><li id="11x5hefs_g_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hefs_g_ful_1-11">全</li><li datascope="11x5hefs_g_big_1-11">大</li><li datascope="11x5hefs_g_sma_1-11">小</li>'
				+'<li datascope="11x5hefs_g_sin_1-11">单</li><li datascope="11x5hefs_g_dou_1-11">双</li><li datascope="11x5hefs_g_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从十、个位各选一个号码组成一注。',
			betexample: '投注方案：* * * 02 03；开奖号码：* * * 02 03',
			bethelp: '从十位、个位中选择一个2位数号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖。',
			formatBalls : function(balls) {
				return formatBall(balls['s'])+','+formatBall(balls['g']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.s") || !way.get(this.rulecode + ".count.g")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balls = way.get(this.rulecode + ".balls.s");
					var ballg = way.get(this.rulecode + ".balls.g");
					  var itemcount = 0;
				        for (var i = 0; i < balls.length; i++) {
				            for (var j = 0; j < ballg.length; j++) {
				                	if(balls[i]!=undefined&&ballg[j]!=undefined&&balls[i]!=""&&ballg[j]!=""){
					                    if (balls[i] != ballg[j]) {
					                    	itemcount++;
					                    }
				                	}
				            }
				        }
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b","s","g"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5heds":{
			showname: '单式',
			rulecode: '11x5heds',
			realname: '[后二星直选_单式]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入2个号码组成一注。',
			betexample: '投注方案：* * * 0203； 开奖号码：* * * 02 03，即中前三星直选一等奖',
			bethelp: '手动输入号码，从01-11中任意输入2个号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序一致，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v=way.get("Lottery.context");
					var reg=/(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz=util_unique(v, reg, 2);
					sszz = sszz.sort();
					if(sszz){
						itemcount=sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k=String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' '&&k!=','&&k!=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context","");
			}

		},
		"11x5qezx": {
			showname: '前二',
			rulecode: '11x5qezx',
			realname: '[二星组选_前二]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.11,
			minMode:1850,
			startPrice:100,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qezx">'
				+ '<dd><h5>前二组选</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qezx_b_01">01</li><li id="11x5qezx_b_02">02</li><li id="11x5qezx_b_03">03</li>'
				+'<li id="11x5qezx_b_04">04</li><li id="11x5qezx_b_05">05</li><li id="11x5qezx_b_06">06</li><li id="11x5qezx_b_07">07</li>'
				+'<li id="11x5qezx_b_08">08</li><li id="11x5qezx_b_09">09</li><li id="11x5qezx_b_10">10</li><li id="11x5qezx_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qezx_b_ful_1-11">全</li><li datascope="11x5qezx_b_big_1-11">大</li><li datascope="11x5qezx_b_sma_1-11">小</li>'
				+'<li datascope="11x5qezx_b_sin_1-11">单</li><li datascope="11x5qezx_b_dou_1-11">双</li><li datascope="11x5qezx_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '01-11中任意选择2个号码组成一注，所选号码与开奖号码的万位、千位相同，且顺序不限，即为中奖。',
			betexample: '如：选择01 02（展开为01 02 * * *、02 01 * * *，），开奖号码为01 02 * * *或者02 01 * * *，即为中奖。',
			bethelp: '01-11中任意选择2个号码组成一注，所选号码与开奖号码的万位、千位相同，且顺序不限，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>1){
						itemcount=Number(ballC)*(Number(ballC)-1)/2;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5qedt":{
			showname: '组二',
			rulecode: '11x5qedt',
			realname: '[前二星_前二胆拖]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5qedt"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qedt_d_01">01</li><li id="11x5qedt_d_02">02</li><li id="11x5qedt_d_03">03</li>'
				+'<li id="11x5qedt_d_04">04</li><li id="11x5qedt_d_05">05</li><li id="11x5qedt_d_06">06</li><li id="11x5qedt_d_07">07</li>'
				+'<li id="11x5qedt_d_08">08</li><li id="11x5qedt_d_09">09</li><li id="11x5qedt_d_10">10</li><li id="11x5qedt_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qedt_d_ful_1-11">全</li><li datascope="11x5qedt_d_big_1-11">大</li><li datascope="11x5qedt_d_sma_1-11">小</li>'
				+'<li datascope="11x5qedt_d_sin_1-11">单</li><li datascope="11x5qedt_d_dou_1-11">双</li><li datascope="11x5qedt_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5qedt_t_01">01</li><li id="11x5qedt_t_02">02</li><li id="11x5qedt_t_03">03</li>'
				+'<li id="11x5qedt_t_04">04</li><li id="11x5qedt_t_05">05</li><li id="11x5qedt_t_06">06</li><li id="11x5qedt_t_07">07</li>'
				+'<li id="11x5qedt_t_08">08</li><li id="11x5qedt_t_09">09</li><li id="11x5qedt_t_10">10</li><li id="11x5qedt_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5qedt_t_ful_1-11">全</li><li datascope="11x5qedt_t_big_1-11">大</li><li datascope="11x5qedt_t_sma_1-11">小</li>'
				+'<li datascope="11x5qedt_t_sin_1-11">单</li><li datascope="11x5qedt_t_dou_1-11">双</li><li datascope="11x5qedt_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中，选取2个及以上的号码进行投注，每注需只能包含1个胆码及1个以上的拖码。',
			betexample: '如投注的胆码是01，拖码是02，开奖号码是02 01 05 06 07，即中奖。',
			bethelp: '胆码个数只能一个，拖码个数为一个以上',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balld = way.get(this.rulecode + ".balls.d");
					var ballt = way.get(this.rulecode + ".balls.t");
					
					if(balld&&balld.length>0&&ballt&&ballt.length>0){
						var isfor=true;
						for(i=0;isfor&&i<balld.length;i++)
							if(balld[i])
								for(j=0;j<ballt.length;j++)
									if(ballt[j]&&ballt[j]==balld[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					var b=true;
					for (var i = 0; i < ballt.length; i++) {
						if(ballt[i]!=""){
							for(var j=0;j<balld.length;j++)
					         if(ballt[i]==balld[j]&&balld[j]!=null){
					        	 b=false;
					        	 break;
					         }
						}
				    }
					if(b){
						if(d_count==1&&t_count>=1){
							itemcount=parseInt(t_count);
						}
					    
						way.set("Lottery.itemcount", ""+itemcount);
						var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
						if (total)
							way.set("Lottery.total",  total.toFixed(4));
						else{
							way.set("Lottery.total", "0");
							way.set("Lottery.itemcount", "0");
						}
					}else{
						way.set("Lottery.total", "0");
						way.set("Lottery.itemcount", "0");
					}
					
				} else {
					way.set("Lottery.total", "0");
					way.set("Lottery.itemcount", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5hezx": {
			showname: '后二',
			rulecode: '11x5hezx',
			realname: '[二星组选_后二]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.11,
			minMode:1850,
			startPrice:100,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hezx">'
				+ '<dd><h5>后二组选</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hezx_b_01">01</li><li id="11x5hezx_b_02">02</li><li id="11x5hezx_b_03">03</li>'
				+'<li id="11x5hezx_b_04">04</li><li id="11x5hezx_b_05">05</li><li id="11x5hezx_b_06">06</li><li id="11x5hezx_b_07">07</li>'
				+'<li id="11x5hezx_b_08">08</li><li id="11x5hezx_b_09">09</li><li id="11x5hezx_b_10">10</li><li id="11x5hezx_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hezx_b_ful_1-11">全</li><li datascope="11x5hezx_b_big_1-11">大</li><li datascope="11x5hezx_b_sma_1-11">小</li>'
				+'<li datascope="11x5hezx_b_sin_1-11">单</li><li datascope="11x5hezx_b_dou_1-11">双</li><li datascope="11x5hezx_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '01-11中任意选择2个号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序不限，即为中奖。',
			betexample: '如：选择01 02（展开为* * * 01 02和* * * 02 01，），开奖号码为* * * 01 02或 * * * * 02 01，即为中奖。',
			bethelp: '01-11中任意选择2个号码组成一注，所选号码与开奖号码的十位、个位相同，且顺序不限，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>1){
						itemcount=Number(ballC)*(Number(ballC)-1)/2;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},"11x5hedt":{
			showname: '组二',
			rulecode: '11x5hedt',
			realname: '[后二星_后二胆拖]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5hedt"><dd><h5>胆码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hedt_d_01">01</li><li id="11x5hedt_d_02">02</li><li id="11x5hedt_d_03">03</li>'
				+'<li id="11x5hedt_d_04">04</li><li id="11x5hedt_d_05">05</li><li id="11x5hedt_d_06">06</li><li id="11x5hedt_d_07">07</li>'
				+'<li id="11x5hedt_d_08">08</li><li id="11x5hedt_d_09">09</li><li id="11x5hedt_d_10">10</li><li id="11x5hedt_d_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hedt_d_ful_1-11">全</li><li datascope="11x5hedt_d_big_1-11">大</li><li datascope="11x5hedt_d_sma_1-11">小</li>'
				+'<li datascope="11x5hedt_d_sin_1-11">单</li><li datascope="11x5hedt_d_dou_1-11">双</li><li datascope="11x5hedt_d_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>拖码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5hedt_t_01">01</li><li id="11x5hedt_t_02">02</li><li id="11x5hedt_t_03">03</li>'
				+'<li id="11x5hedt_t_04">04</li><li id="11x5hedt_t_05">05</li><li id="11x5hedt_t_06">06</li><li id="11x5hedt_t_07">07</li>'
				+'<li id="11x5hedt_t_08">08</li><li id="11x5hedt_t_09">09</li><li id="11x5hedt_t_10">10</li><li id="11x5hedt_t_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5hedt_t_ful_1-11">全</li><li datascope="11x5hedt_t_big_1-11">大</li><li datascope="11x5hedt_t_sma_1-11">小</li>'
				+'<li datascope="11x5hedt_t_sin_1-11">单</li><li datascope="11x5hedt_t_dou_1-11">双</li><li datascope="11x5hedt_t_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中，选取2个及以上的号码进行投注，每注需只能包含1个胆码及1个以上的拖码。',
			betexample: '如投注的胆码是01，拖码是 02，开奖号码是05 06 02 01 04，即中奖。',
			bethelp: '胆码个数只能一个，拖码个数为一个以上',
			textarea: {},
			formatBalls : function(balls) {
				return formatBall(balls['d'])+','+formatBall(balls['t']);
			},
			vali: function(e) {
				if (!way.get(this.rulecode + ".count.d") || !way.get(this.rulecode + ".count.t")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var balld = way.get(this.rulecode + ".balls.d");
					var ballt = way.get(this.rulecode + ".balls.t");
					
					if(balld&&balld.length>0&&ballt&&ballt.length>0){
						var isfor=true;
						for(i=0;isfor&&i<balld.length;i++)
							if(balld[i])
								for(j=0;j<ballt.length;j++)
									if(ballt[j]&&ballt[j]==balld[i]) {
										var ss = e.target.id.split("_");
										var balls = way.get(ss[0] + ".balls." + ss[1]);										
										var count = way.get(ss[0] + ".count." + ss[1]);
										if ($(e.target).hasClass("cur")) {
											$(e.target).removeClass("cur");
											balls[eval(ss[2])] = "";
											way.set(ss[0] + ".count." + ss[1], count - 1);
										} else {
											$(e.target).addClass("cur");
											balls[eval(ss[2])] = ss[2];
											way.set(ss[0] + ".count." + ss[1], count + 1);
										}
										popTips('胆码拖码数字不能相同', "error");
										isfor=false;
										break;
							}
					}
					
					var d_count=way.get(this.rulecode + ".count.d");
					var t_count=way.get(this.rulecode + ".count.t");
					var itemcount=0;
					var b=true;
					for (var i = 0; i < ballt.length; i++) {
						if(ballt[i]!=""){
							for(var j=0;j<balld.length;j++)
					         if(ballt[i]==balld[j]&&balld[j]!=null){
					        	 b=false;
					        	 break;
					         }
						}
				    }
					if(b){
						if(d_count==1&&t_count>=1){
							itemcount=parseInt(t_count);
						}
					    
						way.set("Lottery.itemcount", ""+itemcount);
						var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
						if (total)
							way.set("Lottery.total",  total.toFixed(4));
						else{
							way.set("Lottery.total", "0");
							way.set("Lottery.itemcount", "0");
						}
					}else{
						way.set("Lottery.total", "0");
						way.set("Lottery.itemcount", "0");
					}
					
				} else {
					way.set("Lottery.total", "0");
					way.set("Lottery.itemcount", "0");
				}
			},
			clear:function(){
				var ss=["d","t"];
				for(var k=0;k<2;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5bdwqs": {
			showname: '前三',
			rulecode: '11x5bdwqs',
			realname: '[不定位_前三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=3;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.01,
			minMode:1850,
			startPrice:6.7,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5bdwqs">'
				+ '<dd><h5>前三一码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5bdwqs_b_01">01</li><li id="11x5bdwqs_b_02">02</li><li id="11x5bdwqs_b_03">03</li>'
				+'<li id="11x5bdwqs_b_04">04</li><li id="11x5bdwqs_b_05">05</li><li id="11x5bdwqs_b_06">06</li><li id="11x5bdwqs_b_07">07</li>'
				+'<li id="11x5bdwqs_b_08">08</li><li id="11x5bdwqs_b_09">09</li><li id="11x5bdwqs_b_10">10</li><li id="11x5bdwqs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5bdwqs_b_ful_1-11">全</li><li datascope="11x5bdwqs_b_big_1-11">大</li><li datascope="11x5bdwqs_b_sma_1-11">小</li>'
				+'<li datascope="11x5bdwqs_b_sin_1-11">单</li><li datascope="11x5bdwqs_b_dou_1-11">双</li><li datascope="11x5bdwqs_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的万位、千位、百位中包含所选号码，即为中奖。',
			betexample: ' 如：选择不定位01，开出01 * * * *、* 01 * * *、* * 01 * *即为中奖。',
			bethelp: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的万位、千位、百位中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC)
						itemcount=ballC;
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5bdwzs": {
			showname: '中三',
			rulecode: '11x5bdwzs',
			realname: '[不定位_中三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=3;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.01,
			minMode:1850,
			startPrice:6.7,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5bdwzs">'
				+ '<dd><h5>中三一码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5bdwzs_b_01">01</li><li id="11x5bdwzs_b_02">02</li><li id="11x5bdwzs_b_03">03</li>'
				+'<li id="11x5bdwzs_b_04">04</li><li id="11x5bdwzs_b_05">05</li><li id="11x5bdwzs_b_06">06</li><li id="11x5bdwzs_b_07">07</li>'
				+'<li id="11x5bdwzs_b_08">08</li><li id="11x5bdwzs_b_09">09</li><li id="11x5bdwzs_b_10">10</li><li id="11x5bdwzs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5bdwzs_b_ful_1-11">全</li><li datascope="11x5bdwzs_b_big_1-11">大</li><li datascope="11x5bdwzs_b_sma_1-11">小</li>'
				+'<li datascope="11x5bdwzs_b_sin_1-11">单</li><li datascope="11x5bdwzs_b_dou_1-11">双</li><li datascope="11x5bdwzs_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的千位、百位、十位中包含所选号码，即为中奖。 ',
			betexample: '如：选择不定位02，开出* 02 * * *、* * 02 * *、* * * 02 *即为中奖。',
			bethelp: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的千位、百位、十位中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC){
						itemcount=ballC;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5bdwhs": {
			showname: '后三',
			rulecode: '11x5bdwhs',
			realname: '[不定位_后三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=3;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.01,
			minMode:1850,
			startPrice:6.7,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5bdwhs">'
				+ '<dd><h5>后三一码</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5bdwhs_b_01">01</li><li id="11x5bdwhs_b_02">02</li><li id="11x5bdwhs_b_03">03</li>'
				+'<li id="11x5bdwhs_b_04">04</li><li id="11x5bdwhs_b_05">05</li><li id="11x5bdwhs_b_06">06</li><li id="11x5bdwhs_b_07">07</li>'
				+'<li id="11x5bdwhs_b_08">08</li><li id="11x5bdwhs_b_09">09</li><li id="11x5bdwhs_b_10">10</li><li id="11x5bdwhs_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5bdwhs_b_ful_1-11">全</li><li datascope="11x5bdwhs_b_big_1-11">大</li><li datascope="11x5bdwhs_b_sma_1-11">小</li>'
				+'<li datascope="11x5bdwhs_b_sin_1-11">单</li><li datascope="11x5bdwhs_b_dou_1-11">双</li><li datascope="11x5bdwhs_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的百位、十位、个位中包含所选号码，即为中奖。 ',
			betexample: '如：选择不定位03，开出* * 03 * *、* * * 03 *、* * * * 03即为中奖。',
			bethelp: '从01-11中选择1个号码，每注由1个号码组成，只要开奖号码的百位、十位、个位中包含所选号码，即为中奖。 ',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC){
						itemcount=ballC;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5dwd": {
			showname: '定位胆',
			rulecode: '11x5dwd',
			realname: '[定位胆_定位胆]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5;;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.022,
			minMode:1850,
			startPrice:20.02,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5dwd"><dd><h5>万位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dwd_w_01">01</li><li id="11x5dwd_w_02">02</li><li id="11x5dwd_w_03">03</li>'
				+'<li id="11x5dwd_w_04">04</li><li id="11x5dwd_w_05">05</li><li id="11x5dwd_w_06">06</li><li id="11x5dwd_w_07">07</li>'
				+'<li id="11x5dwd_w_08">08</li><li id="11x5dwd_w_09">09</li><li id="11x5dwd_w_10">10</li><li id="11x5dwd_w_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dwd_w_ful_1-11">全</li><li datascope="11x5dwd_w_big_1-11">大</li><li datascope="11x5dwd_w_sma_1-11">小</li>'
				+'<li datascope="11x5dwd_w_sin_1-11">单</li><li datascope="11x5dwd_w_dou_1-11">双</li><li datascope="11x5dwd_w_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>千位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dwd_q_01">01</li><li id="11x5dwd_q_02">02</li><li id="11x5dwd_q_03">03</li>'
				+'<li id="11x5dwd_q_04">04</li><li id="11x5dwd_q_05">05</li><li id="11x5dwd_q_06">06</li><li id="11x5dwd_q_07">07</li>'
				+'<li id="11x5dwd_q_08">08</li><li id="11x5dwd_q_09">09</li><li id="11x5dwd_q_10">10</li><li id="11x5dwd_q_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dwd_q_ful_1-11">全</li><li datascope="11x5dwd_q_big_1-11">大</li><li datascope="11x5dwd_q_sma_1-11">小</li>'
				+'<li datascope="11x5dwd_q_sin_1-11">单</li><li datascope="11x5dwd_q_dou_1-11">双</li><li datascope="11x5dwd_q_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>百位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dwd_b_01">01</li><li id="11x5dwd_b_02">02</li><li id="11x5dwd_b_03">03</li>'
				+'<li id="11x5dwd_b_04">04</li><li id="11x5dwd_b_05">05</li><li id="11x5dwd_b_06">06</li><li id="11x5dwd_b_07">07</li>'
				+'<li id="11x5dwd_b_08">08</li><li id="11x5dwd_b_09">09</li><li id="11x5dwd_b_10">10</li><li id="11x5dwd_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dwd_b_ful_1-11">全</li><li datascope="11x5dwd_b_big_1-11">大</li><li datascope="11x5dwd_b_sma_1-11">小</li>'
				+'<li datascope="11x5dwd_b_sin_1-11">单</li><li datascope="11x5dwd_b_dou_1-11">双</li><li datascope="11x5dwd_b_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>十位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dwd_s_01">01</li><li id="11x5dwd_s_02">02</li><li id="11x5dwd_s_03">03</li>'
				+'<li id="11x5dwd_s_04">04</li><li id="11x5dwd_s_05">05</li><li id="11x5dwd_s_06">06</li><li id="11x5dwd_s_07">07</li>'
				+'<li id="11x5dwd_s_08">08</li><li id="11x5dwd_s_09">09</li><li id="11x5dwd_s_10">10</li><li id="11x5dwd_s_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dwd_s_ful_1-11">全</li><li datascope="11x5dwd_s_big_1-11">大</li><li datascope="11x5dwd_s_sma_1-11">小</li>'
				+'<li datascope="11x5dwd_s_sin_1-11">单</li><li datascope="11x5dwd_s_dou_1-11">双</li><li datascope="11x5dwd_s_cle_1-11">清</li></ul></dd>'
				+ '<dd><h5>个位</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5dwd_g_01">01</li><li id="11x5dwd_g_02">02</li><li id="11x5dwd_g_03">03</li>'
				+'<li id="11x5dwd_g_04">04</li><li id="11x5dwd_g_05">05</li><li id="11x5dwd_g_06">06</li><li id="11x5dwd_g_07">07</li>'
				+'<li id="11x5dwd_g_08">08</li><li id="11x5dwd_g_09">09</li><li id="11x5dwd_g_10">10</li><li id="11x5dwd_g_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5dwd_g_ful_1-11">全</li><li datascope="11x5dwd_g_big_1-11">大</li><li datascope="11x5dwd_g_sma_1-11">小</li>'
				+'<li datascope="11x5dwd_g_sin_1-11">单</li><li datascope="11x5dwd_g_dou_1-11">双</li><li datascope="11x5dwd_g_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从万位、千位、百位、十位、个位任意1个位置或多个位置上选择1个号码，所选号码与相同位置上的开奖号码一致，即为中奖。',
			betexample: ' 如：定万位为01，开奖号码为 01****即为中奖。',
			bethelp: '从万位、千位、百位、十位、个位任意1个位置或多个位置上选择1个号码，所选号码与相同位置上的开奖号码一致，即为中奖。 ',
			formatBalls : function(balls) {
				return formatBall(balls['w'])+','+formatBall(balls['q'])+','+
					formatBall(balls['b'])+','+formatBall(balls['s'])+','+formatBall(balls['g']);
			},
			vali: function() {
				if (!way.get(this.rulecode + ".count.w")&&!way.get(this.rulecode + ".count.q")&&!way.get(this.rulecode + ".count.b")&&!way.get(this.rulecode + ".count.s")&&!way.get(this.rulecode + ".count.g")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballW = way.get(this.rulecode + ".count.w");
					var ballQ = way.get(this.rulecode + ".count.q");
					var ballB = way.get(this.rulecode + ".count.b");
					var ballS = way.get(this.rulecode + ".count.s");
					var ballG = way.get(this.rulecode + ".count.g");
					var itemcount = 0;
					if(ballW){
						itemcount=itemcount+ballW;
					}
					if(ballQ){
						itemcount=itemcount+ballQ;
					}
					if(ballB){
						itemcount=itemcount+ballB;
					}
					if(ballS){
						itemcount=itemcount+ballS;
					}
					if(ballG){
						itemcount=itemcount+ballG;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["w","q","b","s","g"];
				for(var k=0;k<5;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx1z1": {
			showname: '一中一',
			rulecode: '11x5rx1z1',
			realname: '[任选_一中一]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.0044,
			minMode:1850,
			startPrice:4.07,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx1z1">'
				+ '<dd><h5>一中一</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx1z1_b_01">01</li><li id="11x5rx1z1_b_02">02</li><li id="11x5rx1z1_b_03">03</li>'
				+'<li id="11x5rx1z1_b_04">04</li><li id="11x5rx1z1_b_05">05</li><li id="11x5rx1z1_b_06">06</li><li id="11x5rx1z1_b_07">07</li>'
				+'<li id="11x5rx1z1_b_08">08</li><li id="11x5rx1z1_b_09">09</li><li id="11x5rx1z1_b_10">10</li><li id="11x5rx1z1_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx1z1_b_ful_1-11">全</li><li datascope="11x5rx1z1_b_big_1-11">大</li><li datascope="11x5rx1z1_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx1z1_b_sin_1-11">单</li><li datascope="11x5rx1z1_b_dou_1-11">双</li><li datascope="11x5rx1z1_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择1个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: ' 如：选择05，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择1个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC){
						itemcount=ballC;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx2z2": {
			showname: '二中二',
			rulecode: '11x5rx2z2',
			realname: '[任选_二中二]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5*4/2;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.01,
			minMode:1850,
			startPrice:10.02,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx2z2">'
				+ '<dd><h5>二中二</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx2z2_b_01">01</li><li id="11x5rx2z2_b_02">02</li><li id="11x5rx2z2_b_03">03</li>'
				+'<li id="11x5rx2z2_b_04">04</li><li id="11x5rx2z2_b_05">05</li><li id="11x5rx2z2_b_06">06</li><li id="11x5rx2z2_b_07">07</li>'
				+'<li id="11x5rx2z2_b_08">08</li><li id="11x5rx2z2_b_09">09</li><li id="11x5rx2z2_b_10">10</li><li id="11x5rx2z2_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx2z2_b_ful_1-11">全</li><li datascope="11x5rx2z2_b_big_1-11">大</li><li datascope="11x5rx2z2_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx2z2_b_sin_1-11">单</li><li datascope="11x5rx2z2_b_dou_1-11">双</li><li datascope="11x5rx2z2_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择2个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择2个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>1){
						itemcount=Number(ballC)*(Number(ballC)-1)/2;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx3z3": {
			showname: '三中三',
			rulecode: '11x5rx3z3',
			realname: '[任选_三中三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5*4/2;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.03,
			minMode:1850,
			startPrice:30.06,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx3z3">'
				+ '<dd><h5>三中三</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx3z3_b_01">01</li><li id="11x5rx3z3_b_02">02</li><li id="11x5rx3z3_b_03">03</li>'
				+'<li id="11x5rx3z3_b_04">04</li><li id="11x5rx3z3_b_05">05</li><li id="11x5rx3z3_b_06">06</li><li id="11x5rx3z3_b_07">07</li>'
				+'<li id="11x5rx3z3_b_08">08</li><li id="11x5rx3z3_b_09">09</li><li id="11x5rx3z3_b_10">10</li><li id="11x5rx3z3_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx3z3_b_ful_1-11">全</li><li datascope="11x5rx3z3_b_big_1-11">大</li><li datascope="11x5rx3z3_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx3z3_b_sin_1-11">单</li><li datascope="11x5rx3z3_b_dou_1-11">双</li><li datascope="11x5rx3z3_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择3个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 04，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择3个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>2){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)/6;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx4z4": {
			showname: '四中四',
			rulecode: '11x5rx4z4',
			realname: '[任选_四中四]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.12,
			minMode:1850,
			startPrice:120,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx4z4">'
				+ '<dd><h5>四中四</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx4z4_b_01">01</li><li id="11x5rx4z4_b_02">02</li><li id="11x5rx4z4_b_03">03</li>'
				+'<li id="11x5rx4z4_b_04">04</li><li id="11x5rx4z4_b_05">05</li><li id="11x5rx4z4_b_06">06</li><li id="11x5rx4z4_b_07">07</li>'
				+'<li id="11x5rx4z4_b_08">08</li><li id="11x5rx4z4_b_09">09</li><li id="11x5rx4z4_b_10">10</li><li id="11x5rx4z4_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx4z4_b_ful_1-11">全</li><li datascope="11x5rx4z4_b_big_1-11">大</li><li datascope="11x5rx4z4_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx4z4_b_sin_1-11">单</li><li datascope="11x5rx4z4_b_dou_1-11">双</li><li datascope="11x5rx4z4_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择4个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 08 04，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择4个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>3){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)*(Number(ballC)-3)/24;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx5z5": {
			showname: '五中五',
			rulecode: '11x5rx5z5',
			realname: '[任选_五中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.92,
			minMode:1850,
			startPrice:840.24,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx5z5">'
				+ '<dd><h5>五中五</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx5z5_b_01">01</li><li id="11x5rx5z5_b_02">02</li><li id="11x5rx5z5_b_03">03</li>'
				+'<li id="11x5rx5z5_b_04">04</li><li id="11x5rx5z5_b_05">05</li><li id="11x5rx5z5_b_06">06</li><li id="11x5rx5z5_b_07">07</li>'
				+'<li id="11x5rx5z5_b_08">08</li><li id="11x5rx5z5_b_09">09</li><li id="11x5rx5z5_b_10">10</li><li id="11x5rx5z5_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx5z5_b_ful_1-11">全</li><li datascope="11x5rx5z5_b_big_1-11">大</li><li datascope="11x5rx5z5_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx5z5_b_sin_1-11">单</li><li datascope="11x5rx5z5_b_dou_1-11">双</li><li datascope="11x5rx5z5_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择5个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 08 04 03，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择5个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>4){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)*(Number(ballC)-3)*(Number(ballC)-4)/120;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx6z5": {
			showname: '六中五',
			rulecode: '11x5rx6z5',
			realname: '[任选_六中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.15,
			minMode:1850,
			startPrice:140,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx6z5">'
				+ '<dd><h5>六中五</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx6z5_b_01">01</li><li id="11x5rx6z5_b_02">02</li><li id="11x5rx6z5_b_03">03</li>'
				+'<li id="11x5rx6z5_b_04">04</li><li id="11x5rx6z5_b_05">05</li><li id="11x5rx6z5_b_06">06</li><li id="11x5rx6z5_b_07">07</li>'
				+'<li id="11x5rx6z5_b_08">08</li><li id="11x5rx6z5_b_09">09</li><li id="11x5rx6z5_b_10">10</li><li id="11x5rx6z5_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx6z5_b_ful_1-11">全</li><li datascope="11x5rx6z5_b_big_1-11">大</li><li datascope="11x5rx6z5_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx6z5_b_sin_1-11">单</li><li datascope="11x5rx6z5_b_dou_1-11">双</li><li datascope="11x5rx6z5_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择6个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 08 04 03 09，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择6个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>5){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)*(Number(ballC)-3)*(Number(ballC)-4)*(Number(ballC)-5)/720;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx7z5": {
			showname: '七中五',
			rulecode: '11x5rx7z5',
			realname: '[任选_七中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6*5/2;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.04,
			minMode:1850,
			startPrice:40.05,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx7z5">'
				+ '<dd><h5>七中五</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx7z5_b_01">01</li><li id="11x5rx7z5_b_02">02</li><li id="11x5rx7z5_b_03">03</li>'
				+'<li id="11x5rx7z5_b_04">04</li><li id="11x5rx7z5_b_05">05</li><li id="11x5rx7z5_b_06">06</li><li id="11x5rx7z5_b_07">07</li>'
				+'<li id="11x5rx7z5_b_08">08</li><li id="11x5rx7z5_b_09">09</li><li id="11x5rx7z5_b_10">10</li><li id="11x5rx7z5_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx7z5_b_ful_1-11">全</li><li datascope="11x5rx7z5_b_big_1-11">大</li><li datascope="11x5rx7z5_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx7z5_b_sin_1-11">单</li><li datascope="11x5rx7z5_b_dou_1-11">双</li><li datascope="11x5rx7z5_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择7个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 08 04 03 09 01，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择7个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>6){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)*(Number(ballC)-3)
									*(Number(ballC)-4)*(Number(ballC)-5)*(Number(ballC)-6)/5040;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rx8z5": {
			showname: '八中五',
			rulecode: '11x5rx8z5',
			realname: '[任选_八中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=6*5*4/(3*2);
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				} else {
					return currentRecodNumber;
				}
			},
			fixed: 0.02,
			minMode:1850,
			startPrice:15,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5rx8z5">'
				+ '<dd><h5>八中五</h5>'
				+ '<ul class="sz-qiu"><li  id="11x5rx8z5_b_01">01</li><li id="11x5rx8z5_b_02">02</li><li id="11x5rx8z5_b_03">03</li>'
				+'<li id="11x5rx8z5_b_04">04</li><li id="11x5rx8z5_b_05">05</li><li id="11x5rx8z5_b_06">06</li><li id="11x5rx8z5_b_07">07</li>'
				+'<li id="11x5rx8z5_b_08">08</li><li id="11x5rx8z5_b_09">09</li><li id="11x5rx8z5_b_10">10</li><li id="11x5rx8z5_b_11">11</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5rx8z5_b_ful_1-11">全</li><li datascope="11x5rx8z5_b_big_1-11">大</li><li datascope="11x5rx8z5_b_sma_1-11">小</li>'
				+'<li datascope="11x5rx8z5_b_sin_1-11">单</li><li datascope="11x5rx8z5_b_dou_1-11">双</li><li datascope="11x5rx8z5_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从01-11共11个号码中选择8个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			betexample: '如：选择05 11 08 04 03 09 01 02，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从01-11共11个号码中选择8个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC>7){
						itemcount=Number(ballC)*(Number(ballC)-1)*(Number(ballC)-2)*
									(Number(ballC)-3)*(Number(ballC)-4)*(Number(ballC)-5)*
									(Number(ballC)-6)*(Number(ballC)-7)/40320;
					}
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else way.set("Lottery.total", "0");
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5rxds1z1":{
			showname: '一中一',
			rulecode: '11x5rxds1z1',
			realname: '[任选单式_一中一]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入1个号码组成一注。',
			betexample: '投注方案：03； 开奖号码：03 * * * *，即为中奖',
			bethelp: '从01-11共11个号码中选择1个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds2z2":{
			showname: '二中二',
			rulecode: '11x5rxds2z2',
			realname: '[任选单式_二中二]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入2个号码组成一注。',
			betexample: '投注方案：0203； 开奖号码：02 03 * * *，即为中奖',
			bethelp: '从01-11共11个号码中选择2个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds3z3":{
			showname: '三中三',
			rulecode: '11x5rxds3z3',
			realname: '[任选单式_三中三]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入3个号码组成一注。',
			betexample: '投注方案：020304； 开奖号码：02 03 04 * *，即为中奖',
			bethelp: '从01-11共11个号码中选择3个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds4z4":{
			showname: '四中四',
			rulecode: '11x5rxds4z4',
			realname: '[任选单式_四中四]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入4个号码组成一注。',
			betexample: '投注方案：02030405； 开奖号码：02 03 04 05 *，即为中奖',
			bethelp: '从01-11共11个号码中选择4个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])(?!\1|\2|\3)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds5z5":{
			showname: '五中五',
			rulecode: '11x5rxds5z5',
			realname: '[任选单式_五中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入5个号码组成一注。',
			betexample: '投注方案：0203040506； 开奖号码：02 03 04 05 06，即为中奖',
			bethelp: '从01-11共11个号码中选择5个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])(?!\1|\2|\3)(0[1-9]|1[01])(?!\1|\2|\3|\4)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds6z5":{
			showname: '六中五',
			rulecode: '11x5rxds6z5',
			realname: '[任选单式_六中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入6个号码组成一注。',
			betexample: '投注方案：020304050607； 开奖号码：02 03 04 05 06，即为中奖',
			bethelp: '从01-11共11个号码中选择6个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])(?!\1|\2|\3)(0[1-9]|1[01])(?!\1|\2|\3|\4)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds7z5":{
			showname: '七中五',
			rulecode: '11x5rxds7z5',
			realname: '[任选单式_七中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入7个号码组成一注。',
			betexample: '投注方案：02030405060708； 开奖号码：02 03 04 05 06，即为中奖',
			bethelp: '从01-11共11个号码中选择7个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])(?!\1|\2|\3)(0[1-9]|1[01])(?!\1|\2|\3|\4)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5|\6)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5rxds8z5":{
			showname: '八中五',
			rulecode: '11x5rxds8z5',
			realname: '[任选单式_八中五]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			fixed: 0.22,
			minMode:1850,
			startPrice:200.2,
			calculatePrize:Env.defaultCalculate,
			bettips: '手动输入号码，从01-11中任意输入8个号码组成一注。',
			betexample: '投注方案：0203040506070809； 开奖号码：02 03 04 05 06，即为中奖',
			bethelp: '从01-11共11个号码中选择8个号码进行购买，只要当期顺序摇出的5个开奖号码中包含所选号码，即为中奖。',
			textarea: {},
			vali: function(k) {
				var itemcount=0;
				if (way.get("Lottery.context")) {
					var v = way.get("Lottery.context");
					var reg = /(0[1-9]|1[01])(?!\1)(0[1-9]|1[01])(?!\1|\2)(0[1-9]|1[01])(?!\1|\2|\3)(0[1-9]|1[01])(?!\1|\2|\3|\4)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5|\6)(0[1-9]|1[01])(?!\1|\2|\3|\4|\5|\6|\7)(0[1-9]|1[01])/g;
					
					v = v.replace(/[^\d]/g, '');
					var sszz = util_unique(v, reg, 2, true);
					sszz = sszz.sort();
					if(sszz){
						itemcount = sszz.length;
						way.set("Lottery.contexts",sszz);
					}
				}
				if (way.get("Lottery.times")) {
					if(itemcount)
						way.set("Lottery.itemcount", ""+itemcount);
						else
						way.set("Lottery.itemcount", "0");
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total)
						way.set("Lottery.total", total.toFixed(4));
					else{ 
						way.set("Lottery.total", "0");
						}
				} else {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				}
			},
			changeContext:function(e){
				var k = String.fromCharCode(e.which);
				if(isNaN(parseInt(k))){
					if(k!=' ' && k!=',' &&k !=';')
						e.returnValue=false;
				}
			},
			clear:function(){
				way.set("Lottery.context", "");
			}
		},
		"11x5dds": {
			showname: '定单双',
			rulecode: '11x5dds',
			realname: '[定单双]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			minMode:1850,
			startPrice:15,
			calculatePrize:Env.defaultCalculate,
			pageHtml:'<dl class="danqiu" id="11x5dds">'
				+ '<dd class="dq-dds"><h5>定单双</h5>'
				+ '<ul class="sz-qiu"><li id="11x5dds_zu_0">5单0双</li>'
				+ '<li id="11x5dds_zu_1">4单1双</li><li id="11x5dds_zu_2">3单2双</li><li id="11x5dds_zu_3">2单3双</li><li id="11x5dds_zu_4">1单4双</li>'
				+ '<li id="11x5dds_zu_5">0单5双</li></ul></dd></dl>',
			bettips: '从不同的单双组合中任意选择1个或1个以上的组合。',
			betexample: '如：选择 5单0双，开奖号码为 01 03 05 07 09，即为中奖。',
			bethelp: '从5种单双个数组合中选择1种组合，当期开奖号码的单双个数与所选单双组合一致，即为中奖。',
            replaceCode:function(codes){
                codes=codes.replace(new RegExp('0 ', 'g'),"5单0双");
                codes=codes.replace(new RegExp('1 ', 'g'),"4单1双");
                codes=codes.replace(new RegExp('2 ', 'g'),"3单2双");
                codes=codes.replace(new RegExp('3 ', 'g'),"2单3双");
                codes=codes.replace(new RegExp('4 ', 'g'),"1单4双");
                codes=codes.replace(new RegExp('5 ', 'g'),"0单5双");
                return codes;
            },
			vali: function() {
				if (!way.get(this.rulecode + ".count.zu")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
                    var itemcount = way.get(this.rulecode + ".count.zu");
                    var m_balls = way.get(this.rulecode + ".balls.zu");
                    var startPrice=0;
                    if(itemcount>0){
                        for(var i=0;i<m_balls.length;i++){
                            if(m_balls[i]){
                                if(startPrice == 0){
                                    startPrice = parseFloat(Env.otherPrize[parseInt(m_balls[i])+'']);
                                }
                                var data = parseFloat(Env.otherPrize[parseInt(m_balls[i])+'']);
                                if(startPrice > data ){
                                    startPrice = data;
                                }
                            }
                        }
                    }
                    this.startPrice=startPrice;
                    way.set('Lottery.prize',(this.startPrice*way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf")*Env.price).toFixed(4));
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total){
						way.set("Lottery.total", total.toFixed(4));
                    } else {
						way.set("Lottery.total", "0");
                    }
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["zu"];
				for(var k=0;k<1;k++)
				for (var i=0; i <= 5; i++) {
					var item = $("#11x5dds_" + ss[k]+"_" +i);
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		},
		"11x5czw": {
			showname: '猜中位',
			rulecode: '11x5czw',
			realname: '[猜中位]',
			maxMultiplePerOrder:-1,
			maxPrize:-1,
			maxRecord:-1,
			obtainMaxBetNumberPerOrder:function(currentRecodNumber){
				var max_p_n=5;
				if(currentRecodNumber>=max_p_n){
					return max_p_n;
				}else{
					return currentRecodNumber;
				}
			},
			fixed: 0.0044,
			minMode:1850,
			startPrice:4.07,
			calculatePrize:Env.defaultCalculate,
			pageHtml : '<dl class="danqiu" id="11x5czw">'
				+ '<dd><h5>猜中位</h5>'
				+ '<ul class="sz-qiu"><li id="11x5czw_b_03">03</li><li id="11x5czw_b_04">04</li>'
				+'<li id="11x5czw_b_05">05</li><li id="11x5czw_b_06">06</li><li id="11x5czw_b_07">07</li>'
				+'<li id="11x5czw_b_08">08</li><li id="11x5czw_b_09">09</li></ul>'
				+ '<ul class="gongn"><li datascope="11x5czw_b_ful_1-11">全</li><li datascope="11x5czw_b_big_1-11">大</li><li datascope="11x5czw_b_sma_1-11">小</li>'
				+'<li datascope="11x5czw_b_sin_1-11">单</li><li datascope="11x5czw_b_dou_1-11">双</li><li datascope="11x5czw_b_cle_1-11">清</li></ul></dd></dl>',
			bettips: '从3-9中任意选择1个或1个以上数字。',
			betexample: ' 如：选择 05，开奖号码为08 04 11 05 03，即为中奖',
			bethelp: '从3-9中选择1个号码进行购买，所选号码与5个开奖号码按照大小顺序排列后的第3个号码相同，即为中奖。',
			vali: function() {
				if (!way.get(this.rulecode + ".count.b")) {
					way.set("Lottery.itemcount", "0");
					way.set("Lottery.total", "0");
				} else if (way.get("Lottery.times")) {
					var ballC = way.get(this.rulecode + ".count.b");
					var itemcount = 0;
					if(ballC){
						itemcount=ballC;
					}
                    var m_balls = way.get(this.rulecode + ".balls.b");
                    var startPrice=0;
                    if(itemcount>0){
                        for(var i=0;i<m_balls.length;i++){
                            if(m_balls[i]){
                                if(startPrice == 0){
                                    startPrice = parseFloat(Env.otherPrize[parseInt(m_balls[i])+'']);
                                }
                                var data = parseFloat(Env.otherPrize[parseInt(m_balls[i])+'']);
                                if(startPrice > data ){
                                    startPrice = data;
                                }
                            }
                        }
                    }
                    this.startPrice=startPrice;
                    way.set('Lottery.prize',(this.startPrice*way.get("http://www.yugj881.com/resources/main/lottery/Lottery.yjf")*Env.price).toFixed(4));
					way.set("Lottery.itemcount", ""+itemcount);
					var total = itemcount * way.get("Lottery.times") * way.get( "http://www.yugj881.com/resources/main/lottery/Lottery.yjf") * Env.price;
					if (total){
						way.set("Lottery.total", total.toFixed(4));
                    } else{
						way.set("Lottery.total", "0");
                    }
				} else {
					way.set("Lottery.total", "0");
				}
			},
			clear:function(){
				var ss=["b"];
				for(var k=0;k<3;k++)
				for (var i=1; i <= 11; i++) {
					var item = $("#"+this.rulecode+"_" + ss[k]+"_" + (i<10?("0"+i):i));
					if (item.hasClass("cur")) {
						item.trigger('click');
					} 
				}
			}
		}
};